import java.util.*;
import java.util.HashMap;
import java.util.HashSet;

public class text10 {
    public static int[] FindNumsAppearOnce (int[] array) {
        int[] arr = new int[array.length];
        int i = 0;
        HashMap<Integer,Integer> b = new HashMap<>();
        for (i = 0; i < array.length; i++) {
            if (!b.containsKey(array[i])) {
                b.put(array[i],1);
            } else {
                Integer n=b.get(array[i]);
                b.put(array[i],n+1);

            }
        }
        int c=0;
            for(Integer l:b.keySet())
            {
                arr[c]=l;
                c++;

            }
            return arr;


            // write code here
        }





        // write code here



        // write code here
        public static void main(String[] args) {
            int[]arr={5,3,1,2,4};
            int[]num=FindNumsAppearOnce(arr);
            System.out.println(1);
            //TreeMap<Integer,Integer>b=new TreeMap<>();
        }

    public static void main1(String[] args) {
        int[]arr={1,2,3,4,3,4};
        int[]num=FindNumsAppearOnce(arr);
        System.out.println(1);


    }
}
